function dosubmit(){
    if($("table.table-striped tr").length==1){
        alert("购物车没有菜品信息！");
        return;
        }
    if(!window.confirm("确定要进行结算？")){
        return;
        }
        var ptype = $("input[name='ptype']:checked").val();
        var bank = $("input[name='bank']:checked").val();
        $.ajax({
            type:'get',
            url:"/web/orders/insert",
            dataType:'text',
            data:{ptype:ptype,bank:bank},
            async: false,
            success:function(res){
                if(res == "Y"){
                    alert("订单添加成功！");
                    window.location.href="/web/";
                }else{
                    alert("订单处理失败！");
                }
            },
        });
    }

function doShow(id){
    $.ajax({
        type:'get',
        url:"/web/orders/detail",
        dataType:'text',
        data:{oid:id},
        async: false,
        success:function(res){
            $("#myModal div.modal-body").empty().append(res);
            $('#myModal').modal({keyboard:false})
        },
    });
}

function doChangeStatus(id,s){
    var info = ["","","确定要删除订单吗？","确定要完成此订单吗？"];
    if(window.confirm(info[s])){
        $.get("/web/orders/status",{oid:id,status:s},function(data){
            if(data == "Y"){
                $("tr.oid"+id).remove();
                }else{
                    alert("订单处理失败！");
            }
        },'text');
    }
}




        	